<template>
  <el-dropdown v-if="devMode" @command="executeCommand">
    <span class="el-icon-caret-bottom">导航</span>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item command="configProperty"><span class="el-icon-setting"></span> 配置应用</el-dropdown-item>
      <el-dropdown-item command="cloneProperty"><span class="el-icon-setting"></span> 配置应用项</el-dropdown-item>
    </el-dropdown-menu>
    <el-dialog :visible.sync="openConfig"  width="600px" append-to-body v-if="openConfig">
      <template slot="title">
        配置应用<el-tag>{{app.name}}</el-tag>
      </template>
      <rva-form viewId="u0_rva_app" :requestParams="{rvaAppParams: app}" @rva-button-click="handleFormButtonClick"
      ></rva-form>
    </el-dialog>
    <el-dialog :visible.sync="openClone" width="900px" append-to-body v-if="openClone">
      <template slot="title">
        配置<el-tag>{{app.name}}</el-tag>的应用项
      </template>
      <rva-crud appId="crud0_rva_appitem" :requestParams="{rvaAppParams: app}"></rva-crud>
    </el-dialog>
  </el-dropdown>
  <h4 v-else class="el-icon-caret-bottom">导航</h4>
</template>

<script>

import config from '@/api/rva/config'
export default {
  mixins: [config],
  props:['app']
};
</script>
